<script setup lang="ts">
import { useUserStore } from '@/stores'
import { loginByPassword } from '@/api/user'
const store = useUserStore()

const btn = async () => {
  const res = await loginByPassword()
}
</script>

<template>
  <p>{{ store.user }}</p>
  <button
    @click="
      store.setUser({
        id: '1',
        mobile: '1',
        account: '1',
        avatar: '1',
        token: '1'
      })
    "
  >
    登录
  </button>
  <button @click="store.delUser()">退出</button>
  <button @click="btn">token</button>
</template>
